$
		.extend({
			StrutsUtils : {
				getValidationErrors : function(data) {
					return jQuery.parseJSON(data);
					/*if (data.indexOf("/* {") == 0) {
						return eval("( " + data.substring(2, data.length - 2)
								+ " )");
					} else {
						return null;
					}*/
				},
				clearValidationErrors : function() {
					$('.error').remove();
				},
				// shows validation errors using functions from
				showValidationErrors : function(form, errors) {
					this.clearValidationErrors();
					var error = $('<div class="error"></div>');
					if (errors.fieldErrors) {
						for ( var fieldName in errors.fieldErrors) {
							for ( var i = 0; i < errors.fieldErrors[fieldName].length; i++) {
								error.append(errors.fieldErrors[fieldName][i]
										+ '<br/>');
							}
						}
						
					}
					if (errors.errors) {
						for ( var i = 0; i < errors.errors.length; i++) {
							error.append(errors.errors[i]
									+ '<br/>');
						}
					}
					error.insertAfter($('#errorAjaxResponse'));
				}
			},
			NumberUtils : {
				acceptNumberOnly : function(e){
					  //if the letter is not digit then display error and don't type anything
					  if( e.which!=8 && e.which!=0 && (e.which<48 || e.which>57))
					  {    
					    return false;
					  }
				},
				
				acceptFloatOnly : function(e){
					if ((e.which != 46 || $(this).val().indexOf('.') != -1) && (e.which < 48 || e.which > 57)) {
					    e.preventDefault();
					}
				},
				
			}
		});
